<!DOCTYPE html>
<html lang="en-US" dir="ltr">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>安装 | Web 工具库模板</title>
    <meta name="description" content="A VitePress Site">
    <meta name="generator" content="VitePress v1.0.1">
    <link rel="preload stylesheet" href="/web-utils-template/assets/style.CLVUdl9b.css" as="style">
    
    <script type="module" src="/web-utils-template/assets/app.DgcQCNj_.js"></script>
    <link rel="preload" href="/web-utils-template/assets/inter-roman-latin.Bu8hRsVA.woff2" as="font" type="font/woff2" crossorigin="">
    <link rel="modulepreload" href="/web-utils-template/assets/chunks/framework.DOaO8ovg.js">
    <link rel="modulepreload" href="/web-utils-template/assets/chunks/theme.DJ0nZxEt.js">
    <link rel="modulepreload" href="/web-utils-template/assets/guide_installation.md.CGNhLFeB.lean.js">
    <link rel="icon" type="image/svg+xml" href="/web-utils-template/vue.svg">
    <script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
    <script id="check-mac-os">document.documentElement.classList.toggle("mac",/Mac|iPhone|iPod|iPad/i.test(navigator.platform));</script>
  </head>
  <body>
    <div id="app"><div class="Layout" data-v-e808aada><!--[--><!--]--><!--[--><span tabindex="-1" data-v-6718eb1c></span><a href="#VPContent" class="VPSkipLink visually-hidden" data-v-6718eb1c> Skip to content </a><!--]--><!----><header class="VPNav" data-v-e808aada data-v-929c1069><div class="VPNavBar has-sidebar top" data-v-929c1069 data-v-2031f861><div class="wrapper" data-v-2031f861><div class="container" data-v-2031f861><div class="title" data-v-2031f861><div class="VPNavBarTitle has-sidebar" data-v-2031f861 data-v-813f4990><a class="title" href="/web-utils-template/" data-v-813f4990><!--[--><!--]--><!----><span data-v-813f4990>Web 工具库模板</span><!--[--><!--]--></a></div></div><div class="content" data-v-2031f861><div class="content-body" data-v-2031f861><!--[--><!--]--><div class="VPNavBarSearch search" data-v-2031f861><!--[--><!----><div id="local-search"><button type="button" class="DocSearch DocSearch-Button" aria-label="Search"><span class="DocSearch-Button-Container"><span class="vp-icon DocSearch-Search-Icon"></span><span class="DocSearch-Button-Placeholder">查找</span></span><span class="DocSearch-Button-Keys"><kbd class="DocSearch-Button-Key"></kbd><kbd class="DocSearch-Button-Key">K</kbd></span></button></div><!--]--></div><nav aria-labelledby="main-nav-aria-label" class="VPNavBarMenu menu" data-v-2031f861 data-v-7c39e9c9><span id="main-nav-aria-label" class="visually-hidden" data-v-7c39e9c9>Main Navigation</span><!--[--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/web-utils-template/" tabindex="0" data-v-7c39e9c9 data-v-b9200a99><!--[--><span data-v-b9200a99>首页</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink active" href="/web-utils-template/guide/installation.html" tabindex="0" data-v-7c39e9c9 data-v-b9200a99><!--[--><span data-v-b9200a99>工具</span><!--]--></a><!--]--><!--]--></nav><!----><div class="VPNavBarAppearance appearance" data-v-2031f861 data-v-4e095a04><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title="Switch to dark theme" aria-checked="false" data-v-4e095a04 data-v-55ed6563 data-v-2a1906d1><span class="check" data-v-2a1906d1><span class="icon" data-v-2a1906d1><!--[--><span class="vpi-sun sun" data-v-55ed6563></span><span class="vpi-moon moon" data-v-55ed6563></span><!--]--></span></span></button></div><div class="VPSocialLinks VPNavBarSocialLinks social-links" data-v-2031f861 data-v-85b7e809 data-v-cf93fccb><!--[--><a class="VPSocialLink no-icon" href="https://gitee.com/jh_shot/web-utils-template" aria-label="github" target="_blank" rel="noopener" data-v-cf93fccb data-v-1308c580><span class="vpi-social-github" /></a><!--]--></div><div class="VPFlyout VPNavBarExtra extra" data-v-2031f861 data-v-3a72cf56 data-v-edd2544d><button type="button" class="button" aria-haspopup="true" aria-expanded="false" aria-label="extra navigation" data-v-edd2544d><span class="vpi-more-horizontal icon" data-v-edd2544d></span></button><div class="menu" data-v-edd2544d><div class="VPMenu" data-v-edd2544d data-v-d73b0329><!----><!--[--><!--[--><!----><div class="group" data-v-3a72cf56><div class="item appearance" data-v-3a72cf56><p class="label" data-v-3a72cf56>Appearance</p><div class="appearance-action" data-v-3a72cf56><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title="Switch to dark theme" aria-checked="false" data-v-3a72cf56 data-v-55ed6563 data-v-2a1906d1><span class="check" data-v-2a1906d1><span class="icon" data-v-2a1906d1><!--[--><span class="vpi-sun sun" data-v-55ed6563></span><span class="vpi-moon moon" data-v-55ed6563></span><!--]--></span></span></button></div></div></div><div class="group" data-v-3a72cf56><div class="item social-links" data-v-3a72cf56><div class="VPSocialLinks social-links-list" data-v-3a72cf56 data-v-cf93fccb><!--[--><a class="VPSocialLink no-icon" href="https://gitee.com/jh_shot/web-utils-template" aria-label="github" target="_blank" rel="noopener" data-v-cf93fccb data-v-1308c580><span class="vpi-social-github" /></a><!--]--></div></div></div><!--]--><!--]--></div></div></div><!--[--><!--]--><button type="button" class="VPNavBarHamburger hamburger" aria-label="mobile navigation" aria-expanded="false" aria-controls="VPNavScreen" data-v-2031f861 data-v-c921bcfc><span class="container" data-v-c921bcfc><span class="top" data-v-c921bcfc></span><span class="middle" data-v-c921bcfc></span><span class="bottom" data-v-c921bcfc></span></span></button></div></div></div></div><div class="divider" data-v-2031f861><div class="divider-line" data-v-2031f861></div></div></div><!----></header><div class="VPLocalNav has-sidebar empty" data-v-e808aada data-v-2ed5cb68><div class="container" data-v-2ed5cb68><button class="menu" aria-expanded="false" aria-controls="VPSidebarNav" data-v-2ed5cb68><span class="vpi-align-left menu-icon" data-v-2ed5cb68></span><span class="menu-text" data-v-2ed5cb68>Menu</span></button><div class="VPLocalNavOutlineDropdown" style="--vp-vh:0px;" data-v-2ed5cb68 data-v-64c634d3><button data-v-64c634d3>Return to top</button><!----></div></div></div><aside class="VPSidebar" data-v-e808aada data-v-5a3f9dcf><div class="curtain" data-v-5a3f9dcf></div><nav class="nav" id="VPSidebarNav" aria-labelledby="sidebar-aria-label" tabindex="-1" data-v-5a3f9dcf><span class="visually-hidden" id="sidebar-aria-label" data-v-5a3f9dcf> Sidebar Navigation </span><!--[--><!--]--><!--[--><div class="group" data-v-5a3f9dcf><section class="VPSidebarItem level-0 has-active" data-v-5a3f9dcf data-v-8c2536bf><div class="item" role="button" tabindex="0" data-v-8c2536bf><div class="indicator" data-v-8c2536bf></div><h2 class="text" data-v-8c2536bf>基础</h2><!----></div><div class="items" data-v-8c2536bf><!--[--><div class="VPSidebarItem level-1 is-link" data-v-8c2536bf data-v-8c2536bf><div class="item" data-v-8c2536bf><div class="indicator" data-v-8c2536bf></div><a class="VPLink link link" href="/web-utils-template/guide/installation.html" data-v-8c2536bf><!--[--><p class="text" data-v-8c2536bf>安装</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="group" data-v-5a3f9dcf><section class="VPSidebarItem level-0" data-v-5a3f9dcf data-v-8c2536bf><div class="item" role="button" tabindex="0" data-v-8c2536bf><div class="indicator" data-v-8c2536bf></div><h2 class="text" data-v-8c2536bf>工具</h2><!----></div><div class="items" data-v-8c2536bf><!--[--><div class="VPSidebarItem level-1 is-link" data-v-8c2536bf data-v-8c2536bf><div class="item" data-v-8c2536bf><div class="indicator" data-v-8c2536bf></div><a class="VPLink link link" href="/web-utils-template/pages/pdf/" data-v-8c2536bf><!--[--><p class="text" data-v-8c2536bf>PDF导出（A4）</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-8c2536bf data-v-8c2536bf><div class="item" data-v-8c2536bf><div class="indicator" data-v-8c2536bf></div><a class="VPLink link link" href="/web-utils-template/pages/worker/" data-v-8c2536bf><!--[--><p class="text" data-v-8c2536bf>Worker</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><!--]--><!--[--><!--]--></nav></aside><div class="VPContent has-sidebar" id="VPContent" data-v-e808aada data-v-3310fdcb><div class="VPDoc has-sidebar has-aside" data-v-3310fdcb data-v-38b48462><!--[--><!--]--><div class="container" data-v-38b48462><div class="aside" data-v-38b48462><div class="aside-curtain" data-v-38b48462></div><div class="aside-container" data-v-38b48462><div class="aside-content" data-v-38b48462><div class="VPDocAside" data-v-38b48462 data-v-db750571><!--[--><!--]--><!--[--><!--]--><div class="VPDocAsideOutline" role="navigation" data-v-db750571 data-v-fa9e32c0><div class="content" data-v-fa9e32c0><div class="outline-marker" data-v-fa9e32c0></div><div class="outline-title" role="heading" aria-level="2" data-v-fa9e32c0>当前页</div><nav aria-labelledby="doc-outline-aria-label" data-v-fa9e32c0><span class="visually-hidden" id="doc-outline-aria-label" data-v-fa9e32c0> Table of Contents for current page </span><ul class="VPDocOutlineItem root" data-v-fa9e32c0 data-v-6293de89><!--[--><!--]--></ul></nav></div></div><!--[--><!--]--><div class="spacer" data-v-db750571></div><!--[--><!--]--><!----><!--[--><!--]--><!--[--><!--]--></div></div></div></div><div class="content" data-v-38b48462><div class="content-container" data-v-38b48462><!--[--><!--]--><main class="main" data-v-38b48462><div style="position:relative;" class="vp-doc _web-utils-template_guide_installation" data-v-38b48462><div><h1 id="安装" tabindex="-1">安装 <a class="header-anchor" href="#安装" aria-label="Permalink to &quot;安装&quot;">​</a></h1><h2 id="环境支持" tabindex="-1">环境支持 <a class="header-anchor" href="#环境支持" aria-label="Permalink to &quot;环境支持&quot;">​</a></h2><p>不依赖视图框架。</p><h2 id="版本" tabindex="-1">版本 <a class="header-anchor" href="#版本" aria-label="Permalink to &quot;版本&quot;">​</a></h2><p>持续开发中</p><h2 id="使用包管理器" tabindex="-1">使用包管理器 <a class="header-anchor" href="#使用包管理器" aria-label="Permalink to &quot;使用包管理器&quot;">​</a></h2><p>建议您使用包管理器 (NPM, Yarn, PNPM) 安装, 然后您就可以使用打包工具，例如 Vite 和 Webpack</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes material-theme-lighter material-theme-darker vp-code"><code><span class="line"><span style="--shiki-light:#90A4AE;--shiki-dark:#545454;--shiki-light-font-style:italic;--shiki-dark-font-style:italic;"># 选择一个你喜欢的包管理器</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#90A4AE;--shiki-dark:#545454;--shiki-light-font-style:italic;--shiki-dark-font-style:italic;"># NPM</span></span>
<span class="line"><span style="--shiki-light:#E2931D;--shiki-dark:#FFCB6B;">$</span><span style="--shiki-light:#91B859;--shiki-dark:#C3E88D;"> npm</span><span style="--shiki-light:#91B859;--shiki-dark:#C3E88D;"> install</span><span style="--shiki-light:#91B859;--shiki-dark:#C3E88D;"> git+ssh://[项目Git地址]</span><span style="--shiki-light:#91B859;--shiki-dark:#C3E88D;"> --save</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#90A4AE;--shiki-dark:#545454;--shiki-light-font-style:italic;--shiki-dark-font-style:italic;"># Yarn</span></span>
<span class="line"><span style="--shiki-light:#E2931D;--shiki-dark:#FFCB6B;">$</span><span style="--shiki-light:#91B859;--shiki-dark:#C3E88D;"> yarn</span><span style="--shiki-light:#91B859;--shiki-dark:#C3E88D;"> add</span><span style="--shiki-light:#91B859;--shiki-dark:#C3E88D;"> git+ssh://[项目Git地址]</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#90A4AE;--shiki-dark:#545454;--shiki-light-font-style:italic;--shiki-dark-font-style:italic;"># PNPM</span></span>
<span class="line"><span style="--shiki-light:#E2931D;--shiki-dark:#FFCB6B;">$</span><span style="--shiki-light:#91B859;--shiki-dark:#C3E88D;"> pnpm</span><span style="--shiki-light:#91B859;--shiki-dark:#C3E88D;"> add</span><span style="--shiki-light:#91B859;--shiki-dark:#C3E88D;"> git+ssh://[项目Git地址]</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#90A4AE;--shiki-dark:#545454;--shiki-light-font-style:italic;--shiki-dark-font-style:italic;"># 指定具体版本，版本号通过给分支打 tag 生成</span></span>
<span class="line"><span style="--shiki-light:#E2931D;--shiki-dark:#FFCB6B;">$</span><span style="--shiki-light:#91B859;--shiki-dark:#C3E88D;"> pnpm</span><span style="--shiki-light:#91B859;--shiki-dark:#C3E88D;"> add</span><span style="--shiki-light:#91B859;--shiki-dark:#C3E88D;"> git+ssh://[项目Git地址]#v1.0.0</span></span></code></pre></div><h2 id="浏览器直接引入" tabindex="-1">浏览器直接引入 <a class="header-anchor" href="#浏览器直接引入" aria-label="Permalink to &quot;浏览器直接引入&quot;">​</a></h2><p>暂不支持</p><h2 id="按需加载" tabindex="-1">按需加载 <a class="header-anchor" href="#按需加载" aria-label="Permalink to &quot;按需加载&quot;">​</a></h2><p>完整路径引用具体工具</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes material-theme-lighter material-theme-darker vp-code"><code><span class="line"><span style="--shiki-light:#39ADB5;--shiki-dark:#89DDFF;--shiki-light-font-style:italic;--shiki-dark-font-style:italic;">import</span><span style="--shiki-light:#39ADB5;--shiki-dark:#89DDFF;"> {</span><span style="--shiki-light:#90A4AE;--shiki-dark:#EEFFFF;"> AppWorker</span><span style="--shiki-light:#39ADB5;--shiki-dark:#89DDFF;"> }</span><span style="--shiki-light:#39ADB5;--shiki-dark:#89DDFF;--shiki-light-font-style:italic;--shiki-dark-font-style:italic;"> from</span><span style="--shiki-light:#39ADB5;--shiki-dark:#89DDFF;"> &#39;</span><span style="--shiki-light:#91B859;--shiki-dark:#C3E88D;">internal-web-utils/lib/worker/index</span><span style="--shiki-light:#39ADB5;--shiki-dark:#89DDFF;">&#39;</span></span></code></pre></div></div></div></main><footer class="VPDocFooter" data-v-38b48462 data-v-8c61dbc2><!--[--><!--]--><div class="edit-info" data-v-8c61dbc2><!----><div class="last-updated" data-v-8c61dbc2><p class="VPLastUpdated" data-v-8c61dbc2 data-v-01a4b550>最近更新: <time datetime="2023-07-11T00:42:03.000Z" data-v-01a4b550></time></p></div></div><nav class="prev-next" data-v-8c61dbc2><div class="pager" data-v-8c61dbc2><!----></div><div class="pager" data-v-8c61dbc2><a class="VPLink link pager-link next" href="/web-utils-template/pages/pdf/" data-v-8c61dbc2><!--[--><span class="desc" data-v-8c61dbc2>下一页</span><span class="title" data-v-8c61dbc2>PDF导出（A4）</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><!--]--></div></div>
    <script>window.__VP_HASH_MAP__=JSON.parse("{\"index.md\":\"DzsUuMwG\",\"guide_installation.md\":\"CGNhLFeB\",\"pages_worker_index.md\":\"CiPTKjbc\",\"pages_pdf_index.md\":\"CAVZyg78\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Web 工具库模板\",\"description\":\"A VitePress Site\",\"base\":\"/web-utils-template/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"nav\":[{\"text\":\"首页\",\"link\":\"/\"},{\"text\":\"工具\",\"link\":\"/guide/installation\"}],\"sidebar\":[{\"text\":\"基础\",\"items\":[{\"text\":\"安装\",\"link\":\"/guide/installation\"}]},{\"text\":\"工具\",\"items\":[{\"text\":\"PDF导出（A4）\",\"link\":\"/pages/pdf/\"},{\"text\":\"Worker\",\"link\":\"/pages/worker/\"}]}],\"socialLinks\":[{\"icon\":\"github\",\"link\":\"https://gitee.com/jh_shot/web-utils-template\"}],\"search\":{\"provider\":\"local\",\"options\":{\"translations\":{\"button\":{\"buttonText\":\"查找\"},\"modal\":{\"noResultsText\":\"没有找到\",\"footer\":{\"navigateText\":\"导航\",\"selectText\":\"选择\",\"closeText\":\"关闭\"}}}}},\"docFooter\":{\"prev\":\"上一页\",\"next\":\"下一页\"},\"outlineTitle\":\"当前页\",\"lastUpdatedText\":\"最近更新\"},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
    
  </body>
</html>